/*
 * @Author: xiaosihan
 * @Date: 2021-04-11 22:12:45
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2021-11-06 23:51:47
 */


import ReactMixinComponent from "@ReactMixinComponent";
import * as React from "react";
import { Mesh } from "xsh-react-three";
import { THREEMouseEvent } from "xsh-react-three";
import styles from "./Taideng.less";
import taidengJPG from "./taideng.jpg";
import taidengOBJ from "./taideng.obj";

interface Props {

}

interface State { }

export default class Taideng extends ReactMixinComponent<Props, State> {
    constructor(props: Props) {
        super(props);
    }

    render() {
        return (
            <Mesh
                name="Taideng"
                title={
                    <span className={styles.TaidengTitle}>
                        台灯
                    </span >
                }
                position={{ x: 0, y: 0, z: 0 }}
                rotation={{ x: 0, y: 0, z: 0 }}
                scale={{ x: 0.1, y: 0.1, z: 0.1 }}
                lookAt={undefined}
                alphaTest={1.1}
                geometry={taidengOBJ}
                material="MeshPhongMaterial"
                map={taidengJPG}
                metalness={0}
                cursor="pointer"
                wireframe={false}
                castShadow={true}
                onClick={(e: THREEMouseEvent) => {
                    console.log("Taideng onClick", e);
                }}

                clipping={true}//------------------开启裁剪
                clipIntersection={true}//----------裁剪方式

                // 开启辉光
                glow_enable={false}
                glow_visibleColor="#04fa12" //------可见区域辉光颜色
                glow_hiddenColor="#ff0000" //-------不可见区域辉光颜色
                glow_depthTest={true} //------------深度测试 = false 时 不进行遮挡计算
                glow_opacity={0.8} //---------------辉光透明度
                glow_fill={false} //------------------辉光填充整个模型区域
                glow_blurWidth={5} //----------------辉光厚度
                glow_pulsePeriod={0} //--------------辉光闪烁间隔时间_单位秒
            />
        );
    }

}